home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / etc / bcheckrc.z / bcheckrc
Text File  |  1992-04-03  |  1KB  |  47 lines

  1. #! /bin/sh
  2. #Tag 0x00000f00
  3. #ident    "$Revision: 1.23 $"
  4. #
  5. # This script runs those commands necessary to check file systems, to make
  6. # generic device links, and to do anything else that should be done before
  7. # mounting file systems.
  8. #
  9.  
  10. if [ "`/etc/nvram diskless 2> /dev/null`" -eq 1 ] ; then
  11.     if [ -f /usr/etc/boot/makedev ] ; then
  12.     cd /dev; ./MAKEDEV > /dev/null
  13.     rm -f /usr/etc/boot/makedev
  14.     fi
  15. else
  16.     set `/etc/devnm /`
  17.     rootfs=$1
  18.     /etc/fsstat ${rootfs}  >/dev/null 2>&1
  19.     if [ $? -eq 1 ] ; then
  20.     echo "The root file system, ${rootfs}, is being checked automatically."
  21.     /etc/fsck -y -D -b ${rootfs}
  22.     fi
  23.     set `ls -Lid /dev/root $rootfs`
  24.     if [ ! -b /dev/root -o "$1" -ne "$3" -o ! -c /dev/rroot ] ; then
  25.     rm -rf /dev/root
  26.     ln $rootfs /dev/root
  27.     rm -rf /dev/rroot
  28.     ln /dev/rdsk/`basename $rootfs` /dev/rroot
  29.     fi
  30.  
  31.     if hinv -c tape > /dev/null && [ ! -c /dev/tape ]
  32.     then # a tape has been installed; create the devices for it
  33.         echo Creating tape devices
  34.         cd /dev; ./MAKEDEV tape > /dev/null
  35.     fi
  36. fi
  37.  
  38. # If an lvtab is present, run lvinit; this must be done before any mounts
  39. # since any non-root filesystem may be on a logical volume.
  40.  
  41. if [ -f /etc/lvtab ] ; then
  42.     /etc/lvinit
  43. fi
  44.  
  45. # Remove ps temporary file
  46. rm -rf /tmp/.ps_data
  47.